Synchronization Settings

Synchronization is the process of extracting information from a user’s project to create a Perforce QAC project containing the files and settings from the user’s project.

Default settings are taken from the CCT header. This can be overridden by using the qacli pprops command or the GUI. There are several different sync settings that can be modified, the list below shows which settings can be modified and typical values:

  • INCLUDE_PATH - The tags used to extract Include Paths from the compilation line, e.g. ‑I
  • DEFINE_SYMBOL - The tags used to extract Definitions from the compilation line, e.g. ‑D
  • FLAG_SCRIPT - Path to a script that can be used to extract the Include Paths and Definitions from the command line, e.g. DATA/Helix_Generic_Extract_C++/Script/extract_flags.py
  • EXCLUDE_PROCESS_PATTERN - Specify how processes are excluded from the sync; either by a CSV string match or Regular Expression match, e.g. CSV or REGEXP2
  • EXCLUDE_PROCESS - Specify which processes to exclude from the sync, e.g. for CSV it could be "mv,rm" or for REGEXP2 it could be "\b(rm|mv)\b". This will remove from the sync rm or mv commands. The CSV variant only matches on the first word in the command line, the regex version uses the entire command line for a match.
  • FILE_FILTER - Filter out individual files or folders from the sync. Simple string matching is used, e.g. /home/project/subproject will filter the folder /home/project/subproject as well as the file /home/project/subproject1.cpp
If you do not want any files to be filtered out during sync then you need to specify a 'dummy' value that can never be matched, for example "<unused>" would override the values in the CCT and would not find any files to be filtered.

List Sync Settings

To list the sync settings for a project:

qacli pprops --view-sync-settings -P <directory>

Set Sync Settings

To set a sync value in a project:

qacli pprops -P <directory> --sync-setting <setting> --set <value>

Set Multiple Sync Settings

Certain settings (INCLUDE_PATH, DEFINE_SYMBOL and FILE_FILTER) can accept multiple settings, separated by a comma. This enables you to set multiple values with a single command:

qacli pprops -P <directory> --sync-setting <setting> --set <value>,<value2>

If any of the values you supply contain a comma, this will cause incorrect parsing and setting of data. To avoid this, use the ‑‑separator (‑x) to specify an alternative character to separate the data on. For example:

qacli pprops -P <directory> --sync-setting <setting> --set "<value>|<value2>" –separator= "|"

Unset Sync Settings

To remove a sync value in a project:

qacli pprops -P <directory> --sync-setting <setting> --unset <value>

You can also use this to remove multiple values at once:

qacli pprops -P <directory> --sync-setting <setting> --unset <value>,<value2>

Again, if any of the values you supply contain the comma character then use the ‑‑separator (‑x) to specify an alternative character to separate the data on. For example:

qacli pprops -P <directory> --sync-setting <setting> --unset "<value>|<value2> " –separator= "|"

Set Exclusion Pattern

To change the exclusion pattern mode:

qacli pprops -P <directory> --sync-setting EXCLUDE_PROCESS_PATTERN --set <value>

<value> is either CSV or REGEXP2.

Setting a new exclusion pattern will clear the EXCLUDE_PROCESS strings.

Reset Sync Setting

To reset a sync setting in a project, use the following:

qacli pprops -P <directory> --sync-setting <setting> --reset

The <setting> can be INCLUDE_PATH, DEFINE_SYMBOL, FLAG_SCRIPT, EXCLUDE_PROCESS, EXCLUDE_PROCESS_PATTERN, or FILE_FILTER.